home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / CopyStack.cpt / CopyStack / card_2817.txt < prev    next >
Text File  |  1989-02-26  |  6KB  |  180 lines

  1. -- card: 2817 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 2756
  5. -- name: CopyStack
  6.  
  7.  
  8. -- part 7 (button)
  9. -- low flags: 00
  10. -- high flags: 8004
  11. -- rect: left=116 top=21 right=43 bottom=300
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Install CopyStack On Home
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   push card
  23.   set the lockScreen to true
  24.   choose button tool
  25.   click at the loc of card button "CopyStack"
  26.   doMenu "Copy Button"
  27.   go to Home
  28.   doMenu "Paste Button"
  29.   pop card
  30.   choose browse tool
  31.   set the lockScreen to false
  32.   put "CopyStack now installed on your Home card"
  33.   wait for 2 seconds
  34.   hide message
  35. end mouseUp
  36.  
  37.  
  38.  
  39. -- part 8 (button)
  40. -- low flags: 00
  41. -- high flags: 8004
  42. -- rect: left=318 top=21 right=43 bottom=495
  43. -- title width / last selected line: 0
  44. -- icon id / first selected line: 0 / 0
  45. -- text alignment: 1
  46. -- font id: 0
  47. -- text size: 12
  48. -- style flags: 0
  49. -- line height: 16
  50. -- part name: Put CopyStack In Memory
  51. ----- HyperTalk script -----
  52. on mouseUp
  53.   set the lockScreen to true
  54.   choose button tool
  55.   click at the loc of card button "CopyStack"
  56.   doMenu "Copy Button"
  57.   set the lockScreen to false
  58.   put "CopyStack button now in memory"
  59.   wait for 2 seconds
  60.   hide message
  61.   choose browse tool
  62. end mouseUp
  63.  
  64.  
  65.  
  66. -- part 9 (field)
  67. -- low flags: 01
  68. -- high flags: 0004
  69. -- rect: left=2 top=47 right=339 bottom=510
  70. -- title width / last selected line: 0
  71. -- icon id / first selected line: 0 / 0
  72. -- text alignment: 0
  73. -- font id: 3
  74. -- text size: 9
  75. -- style flags: 0
  76. -- line height: 12
  77. -- part name: Instructions
  78.  
  79.  
  80. -- part 17 (button)
  81. -- low flags: 00
  82. -- high flags: 8004
  83. -- rect: left=28 top=26 right=43 bottom=91
  84. -- title width / last selected line: 0
  85. -- icon id / first selected line: 0 / 0
  86. -- text alignment: 1
  87. -- font id: 2
  88. -- text size: 9
  89. -- style flags: 512
  90. -- line height: 12
  91. -- part name: CopyStack
  92. ----- HyperTalk script -----
  93. on Search
  94.   global Source,Destination
  95.   set lockScreen to true
  96.   doMenu "Open Stack..."
  97.   get the name of this stack
  98.   put it into Stak
  99.   go to Source
  100.   set lockScreen to false
  101.   put word 2 of Stak into Destination
  102. end Search
  103.  
  104. on mouseUp
  105.   global Source,Destination,StartCard,CopyCard,NumberOfCards,Selection
  106.   put empty into Destination
  107.   get the name of this stack
  108.   put word 2 of it into Source
  109.   get the id of this card
  110.   put it into StartCard
  111.   put "Will copy from stack" && Source && ", starting with" && StartCard
  112.   set lockScreen to true
  113.   answer "What is the Destination stack?" with "Name" or "Search" or "Cancel"
  114.   if it = "Cancel" then hide message
  115.   if it = "Cancel" then exit mouseUp
  116.   if it = "Search" then put empty into it
  117.   if it = "Name" then ask "What is the Source name?" with empty else Search
  118.   if it <> empty then put numToChar(34) & it & numToChar(34) into temp1
  119.   if Destination = empty then put temp1 into Destination
  120.   put "Will copy to stack" && Destination
  121.   go to Source
  122.   go to StartCard
  123.   ask "Number of Cards (Including this Card)" with empty
  124.   put it into NumberOfCards
  125.   put empty into Selection
  126.   repeat for NumberOfCards times
  127.     put Selection & the id of this card & return into Selection
  128.     put "Getting information from" && the id of this card
  129.     go to next card
  130.   end repeat
  131.   put 0 into temp1
  132.   repeat for NumberOfCards times
  133.     add 1 to temp1
  134.     put line temp1 of Selection into temp2
  135.     go to temp2
  136.     put "Copying" && temp2
  137.     doMenu "Copy Card"
  138.     go to last card of Destination
  139.     put "Pasting" && temp2
  140.     doMenu "Paste Card"
  141.     if temp1 = 1 then get the id of this card
  142.     put it into CopyCard
  143.     go to Source
  144.   end repeat
  145.   set lockScreen to false
  146.   put "Copying complete"
  147.   wait for 2 seconds
  148.   hide message
  149.   answer "Remove CopyStack from this operation?" with "Yes" or "No"
  150.   if it = "No" then go to StartCard
  151.   if it = "No" then hide message
  152.   if it = "No" then exit mouseUp
  153.   set lockScreen to true
  154.   choose button tool
  155.   go to Destination
  156.   go to CopyCard
  157.   click at the loc of card button "CopyStack"
  158.   doMenu "Cut Button"
  159.   go to Source
  160.   go to StartCard
  161.   click at the loc of card button "CopyStack"
  162.   doMenu "Cut Button"
  163.   choose browse tool
  164.   set lockScreen to false
  165. end mouseUp
  166.  
  167.  
  168.  
  169.  
  170. -- part contents for card part 9
  171. ----- text -----
  172.                                                          CopyStack  Version 1.00
  173.  
  174.   Have you ever wanted to add a card or series of cards from one stack to another?  This stack will copy a card or consecutive series of cards from a "Source" stack to a "Destination" stack, automatically.
  175.   Start by selecting Put CopyStack In Memory.  Use COPIES of the originals until you are familiar with the operation of this stack.  Then go to the card in the stack you wish to copy from.  Once there, select Edit/Paste Button or use Command-V.  Choose the browse tool on the Tools menu.  Now count the cards that you want to copy.  It is best to use Command-3 just in case the "Go Next" buttons do not select consecutive cards.  Return to the card that has CopyStack on it.  Click on CopyStack and answer the Destination question using the full name of the stack or having the Search function locate it.  The Search function is a little script used for locating stack names, feel free to implement it in your own stacks.  You will be prompted for the number of cards that are to be copied from the Source stack to the Destination stack.  A running commentary will appear in the message box.  Once completed, CopyStack will return and ask if you wish to remove the CopyStack button.  Use Install CopyStack On Home for installing CopyStack on your Home card for future use.
  176.  
  177. LIMITATIONS:  CopyStack was not designed to be all powerful!  It cannot anticipate the cards you want copied from one stack to another.  Be careful counting the cards that you want to copy and always include the card that has CopyStack on it.  CopyStack will always put the copied cards at the end of the Destination stack.  Also, if the author has been rude enough to put in a safeguard to stop you from looking at the cards scripts, try CopyStack only on a copy of the offending program.  If you have any ideas on how to improve this stack, let me know.  Please write to me at the following address.
  178.  
  179. Wallace Karraker, CIS 76354,3026, Dodge City, Kansas
  180. (p.s.  If a catastrophic system error does occur, I KNOOOW KNOTHINK)